A variable gain amplifier (VGA) often precedes an analog-to-digital converter (ADC) to ensure that the signal at the ADC input does not cause the ADC to overrange. The gain of the VGA is usually set depending on the characteristics of the input signal; a signal with infrequent peaks may be allowed to overrange the ADC, if the input signal is highly over-sampled. Alternatively, a highly deterministic input signal may have the gain modified in anticipation of an overrange event. This leads to many different ways to implement an automatic gain control (AGC) loop between the ADC and the VGA. A generic AGC loop can consist of three elements: firstly a fast response element which is responsible for detecting peaks very fast and providing information to the AGC controller to determine if a gain change is required; this is often referred to as a fast attack loop. The second element is one which looks at some form of average of the entire signal at the ADC input and provides information to the AGC controller; the last element is one which looks at specific parts (channel) of the signal at the ADC input and provides that information to the AGC controller. The AGC controller can then determine how the gain of the VGA needs setting depending upon whether it needs to allow for fast overranges, average input signal levels or specific channel signal levels.
A very common method of implementing an AGC loop with a digital control algorithm is to use the ADC output as a signal level indicator. For the average signal level and the per channel signal level averaging is done, so the output of the ADC can be used. However, if an ADC with more than one clock cycle of latency is used and the final output of the ADC is used to implement a fast attack loop, it is possible that several samples could be overranged before the AGC controller has time to adjust the gain. A common approach to address this are to run the ADC at a higher sample rate, over sampling the ADC input and thereby shortening the absolute response time to an overrange event.